package application;

import java.util.ArrayList;

public class extractRow {
	
	private Projects p;
	ArrayList<ProjectStatistics> projects = new ArrayList<ProjectStatistics>();
	ProjectStatistics ps = new ProjectStatistics(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, 0);
	
	public extractRow(Projects p){
		this.p = p;
	}
	
	public ArrayList<ProjectStatistics> build(int nr){
		for(int i = 0; i < p.getSize();i++){
			if(i != nr){
				projects.add(p.getProject(i));
			}
		}
		ps = p.getProject(nr);
		return projects;
		
	}
	
	public ProjectStatistics getExtractedRow(){
		return ps;
	}
	
}
